package com.mygenostics.bo;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import com.mygenostics.persistence.UserFile;

public abstract class GenoService {
	protected String serviceName;
	
	protected BigDecimal basicPrice;
	
	protected BigDecimal promotedPrice;
	
	protected UserFile userFile;
	
	protected Map<String, SubService> services = new HashMap<String, SubService>();
	
	public abstract BigDecimal getTotalPrice();
	
	public abstract ArrayList<SubService> getListedServices();

	class SubService implements Comparable<SubService> {
		public String subSrvName;
		
		public BigDecimal subSrvPrice;
		
		public boolean removable = false;
		
		public int number;
		
		public int order = 0;

		public int compareTo(SubService o) {
			
			return o.order - this.order;
		}
	}
	
	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public BigDecimal getBasicPrice() {
		return basicPrice;
	}

	public void setBasicPrice(BigDecimal basicPrice) {
		this.basicPrice = basicPrice;
	}

	public BigDecimal getPromotedPrice() {
		return promotedPrice;
	}

	public void setPromotedPrice(BigDecimal promotedPrice) {
		this.promotedPrice = promotedPrice;
	}

	public Map<String, SubService> getServices() {
		return services;
	}

	public void setServices(Map<String, SubService> services) {
		this.services = services;
	}

	public UserFile getUserFile() {
		return userFile;
	}

	public void setUserFile(UserFile userFile) {
		this.userFile = userFile;
	}
	
	
	
}
